home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / printer / jcosub26.zip / DEMO.JS < prev    next >
Text File  |  1997-05-03  |  14KB  |  286 lines

  1. # Demonstration script for JACOsub video titling software.
  2.  
  3. # You might want to print out a hard copy of this script, and refer to it
  4. # while you play the script in Step Mode.
  5.  
  6. # This script demonstrates the flexibility of the JACOsub file format,
  7. # going through nearly all of the features available.  Don't be alarmed
  8. # by the size; this script consists mostly of comments.  The running time
  9. # is less than 90 seconds.
  10.  
  11. # Now let's begin.  All the directives and commands demonstrated in this
  12. # script are shown in UPPERCASE the first time they are used, and in
  13. # lowercase thereafter.
  14.  
  15.   # First, let's set up some defaults.  Time units default to SMPTE
  16.   # (1/30 second) units.  We'll use 1/100 seconds because it's simpler to
  17.   # understand for now.
  18.  
  19. #TIMERES 100
  20.  
  21.   # Note: All # commands may be specified by a single letter.  For example,
  22.   # above we could have used #T instead of #TIMERES.
  23.  
  24.   # Next, suppose this script consisted of subtitles played against a
  25.   # foreign film, and we noticed that the time events were drifting so that
  26.   # by the end of the script, the subtitles were occurring 2.2 seconds too
  27.   # soon.  This means we need to stretch the script's total running time
  28.   # by 2.2 seconds to correct the drift.  The #Ramp command does this.  The
  29.   # number past the decimal point is time units (in 1/100 seconds as
  30.   # specified by the #T command above), not fractions of a second.  The
  31.   # ramp correction may be positive or negative, and you can adjust it on
  32.   # the fly, while the script is playing.
  33.  
  34. #RAMP 2.20
  35.  
  36.   # Set font 3 for using near the end of this script, where we demonstrate
  37.   # outlining and shadowing of mono-color fonts.  JACOsub.font 18 is a
  38.   # mono-color mono-spaced font.  (This font is the one normally used for
  39.   # displaying JACOsub's running clock.)
  40.  
  41. #FONT 3 JACOsub.font 18
  42.  
  43.   # Let's change some default colors while we're at it....
  44.  
  45. #P1  0 14 14     (set "slow text" color 1 of primary palette to cyan)
  46. #p3  d  0  0  1  (set color 3 of palette 1 to red, using hex notation)
  47.  
  48.   # Now we will start with the list of timed lines.  Each timed line has
  49.   # the format
  50.   # <start time> <stop time> <directive> <text>
  51.  
  52.   # Let's load in a graphic file to serve as a backdrop for the first few
  53.   # titles, for the first 9 seconds.  We use the RLB directive for this
  54.   # (meaning "aRgument directive, Load Background graphic").
  55.  
  56. 0:00:00.00 0:00.09.00 RLB JACO.bbm 0 0 {0 0 centers logo on the screen}
  57.  
  58.   # Now, show an introductory title centered on the screen for 4 seconds.
  59.   # This title demonstrates the newline escape character, or manual
  60.   # wordwrap.  The new substrings created will also be word-wrapped
  61.   # automatically if they don't fit within the default width limits.
  62.   # You can also turn a title's wordwrapping off, with the W0 directive.
  63.  
  64.   # Notice also that the concatenation escape code (the \ at the end of
  65.   # each line) is NOT the same as a newline in your text.  The ending \
  66.   # character means, "assume that the next line continues where this line
  67.   # leaves off."  It works even if you split a word into two pieces, as
  68.   # shown below with the word "capabilities."
  69.   # Concatenation ignores all space after the \ and all space before the
  70.   # first non-space character on the line following the \.
  71.  
  72. 0:00:00.00 0:00:04.00 VM JACOsub\n\nThis script demonstrates \
  73.                          some of the capa\
  74.                          bilities of JACOsub.
  75.  
  76.   # The next 3 lines demonstrate vertical positioning and overlapping time
  77.   # ranges.  Notice how the times for each of the lines are set.  All three
  78.   # lines are present on the screen only between times 6.00 and 6.50.
  79.  
  80. 0:00:04.00 0:00:06.50 VT Text may be positioned at the top,
  81. 0:00:05.00 0:00:07.10 vm middle,
  82. 0:00:06.00 0:00:07.70 VB or bottom of the screen.
  83.  
  84.   # The next title shows how you can insert comments inside the text.
  85.   # This is useful for making notes about translations and character names
  86.   # when subtitling foreign films.  Here we also demonstrate how Italics
  87.   # (\I) and Normal (\N) escape codes can be embedded in the title text.
  88.  
  89. 0:00:08.00 0:00:11.00 vm {this is a comment} (And, you just saw, {another \
  90.                          comment} timing ranges for different lines of \
  91.                          text \Iand\N graphics may overlap.)
  92.  
  93.   # Here we demonstrate that graphics time ranges can overlap text time
  94.   # ranges.
  95.  
  96. 0:00:9.00 0:00:12.60 rlb JACO.bbm 25 25   {place logo at lower right}
  97.  
  98.   # Now we demonstrate left/right/center justification.
  99.  
  100. 0:00:11.00 0:00:13.50 JL Within margin constraints\n\
  101.                          that you set, text may be\nleft justified,
  102. 0:00:13.50 0:00:14.75 JC {the JC is redundant - it's the default}\
  103.                          center\njustified,
  104. 0:00:14.75 0:00:16.00 JR and also\nright justified.
  105.  
  106.   # Here we show what you can do with margin settings.  The first line
  107.   # sets the right margin to 33% of the screen (left margin is at 1%), and
  108.   # the second line sets the left margin at 40% of the screen (right
  109.   # margin is at 99%).  We also demonstrate two fonts on the same screen,
  110.   # and full justification using the JF:L directive.
  111.  
  112. 0:00:15.60 0:00:22.00 vtHR33   It's possible, for example, to set margins \
  113.                so that text is confined to the left 1/3 of the screen.
  114. 0:00:17.50 0:00:22.00 vbHL40F1JF:L And you can place other text elsewhere \
  115.          (with a different font, if desired) by setting different \
  116.          margins for it.  As you can see here, the left and right edges \
  117.          of a text block can be aligned automatically, also.
  118.  
  119.   # Now we demonstrate different text styles and colors.  Notice here we
  120.   # use the VL directive to position the text on different lines.  The
  121.   # position of the "line number" after the VL depends on font height.
  122.  
  123. 0:00:22.30 0:00:27.80 VL3 Text may appear in different styles\n(Normal, \
  124.                           \BBold\N, \IItalic\N)
  125. 0:00:22.30 0:00:27.80 vl5 and different \C1colors
  126.                       # Notice here the default text color has been
  127.                       # changed to 1 and restored to 3 inside the text.
  128. 0:00:24.00 0:00:27.80 CF1vl7 all \B\I\C3mixed\b \C1together\N.
  129.  
  130.   # On the same screen, demonstrate loading in a different color palette
  131.   # so that another color appears (color 3=red as defined in Palette 1).
  132.  
  133. 0:00:25.00 0:00:27.80 CP1vl8 (even with different palettes.)
  134.  
  135.   # Before this screen disappears, let's demonstrate the palette fade
  136.   # effect using a dummy blank titles.  The next title will fade the
  137.   # current palette (1 from the previous title) to 0 in 60 video fields
  138.   # (about 1 second on NTSC displays).
  139.  
  140. 0:00:25.50 0:00:27.80 EP0:60  {fade back to palette 0} ~
  141.  
  142.   # Demonstrate the JF:U directive (Unconditional Full Justification)
  143.   # by displaying some examples of movie credits.  The credits are
  144.   # written to be approximately the right length, and the JF:U directive
  145.   # does the rest of the work, adjusting the spaces so the left and
  146.   # right edges are flush with the current margins.
  147.   # Note also that the VM directive would normally center the block of
  148.   # credits on the screen, but here we use VM1 to shift the centered
  149.   # block down 1 line.
  150.  
  151. 0:00:27.80 0:00:32.00 vtcf1 {description} ``Unconditional'' justification is useful for credits:
  152. 0:00:27.80 0:00:32.00 vm1f1JF:U {show credits in various styles}\
  153.       Clint Eastwood . . . . . . . Dirty Harry\n\
  154.       Michael J. Fox . . . . . . Clint Eastwood\n\n\
  155.       Madonna - - - - - - - - - - - Herself\n\
  156.       Eddie Murphy - - - - - - - - Axel Foley\n\n\
  157.       George Lucas -------------------- Director
  158.  
  159.   # Here's a trick.  We will rapidly cycle through some blank screens
  160.   # so that the current display will "catch up" to the background display
  161.   # buffer being generated.  We use color 1 text here, which is slow.
  162.   # The title directive doesn't matter for these rapid blanks, so we
  163.   # will use the program default (D) here.  The default typically
  164.   # positions a title at the bottom center of the display, using margins
  165.   # at the left and right edges (1% and 99%), auto-wordwrap, font 0,
  166.   # color 3, etc.  You may change the default behavior with the #D or
  167.   # #D0 command.
  168.  
  169. 0:00:32.00 0:00:32.02 D ~
  170. 0:00:32.02 0:00:32.04 d ~
  171. 0:00:32.04 0:00:32.06 d ~
  172. 0:00:32.06 0:00:32.08 d ~
  173.  
  174.   # But before we show catching up to the generating buffer, just for
  175.   # fun, let's define directive D2 as CF1VM to use in the next line, for
  176.   # "Color Fontface 1, Vertical position Middle."  We'll also name this
  177.   # default directive to middle_altcolor.  This way, we can use either
  178.   # designation D2 or [middle_altcolor] in the title's directive string.
  179.  
  180. #D2 CF1VM middle_altcolor
  181.  
  182. 0:00:32.10 0:00:36.00 [middle_altcolor] Here the display was \
  183.          intentionally ``caught up'' to the background generation, \
  184.          to show how slowly color 1 text is generated in the background.
  185.  
  186.   # In the next title, lots of things happen at once.  We demonstrate
  187.   # Three things: block justification with word justification, the vertical
  188.   # continuation directive, and background shading.
  189.  
  190.   # The first title after this comment demonstrates the JB (Justify Block)
  191.   # directive.  Text is left-justified, but it is not positioned flush with
  192.   # the left margin - the block of text is centered on the screen (JBC) but
  193.   # the first character of each line are flush left.  In other words, the
  194.   # JL means "left justify" but JBC means "center the block of text."
  195.  
  196.   # The next title demonstrates the VU directive to show how you can
  197.   # continue a long line of text underneath previous ones.
  198.   # Here we also demonstrates background shading -- a semi-transparent
  199.   # rectangle will appear behind the text, 8 pixels larger than the text
  200.   # all around, using the directive CS8.
  201.  
  202. 0:00:36.30 0:00:45.00 [middle_altcolor]jlJBC \
  203.    You will see that sort of foreground generation if you use a lot of \
  204.    ``slow'' color 1 text.\n\C3(Color 3 text is very fast.)
  205. 0:00:36.30 0:00:45.00 VUcf1CS8 \n\n\Plan your timings so the display won't catch up to the view being generated in the background.
  206.  
  207.   # Demonstrate backgrounds that are opaque to the genlock, by specifying
  208.   # a background color.  This will clear the whole screen to that color
  209.   # before any text is drawn on it, and before any IFF files are overlaid
  210.   # onto it.
  211.  
  212. 0:00:45.00 0:00:51.00 CB1vm You can change the screen background color, too.\
  213. \n\nThis is useful if you want to make an opaque screen when using a genlock.
  214.  
  215.   # Now we demonstrate some of the transition effects.  We will use
  216.   # the VU directive to stack the lines so that they are all treated
  217.   # as a single block having the VM directive of the first line.
  218.  
  219. 0:00:51.00 0:01:00.00 EIO10vm {iris open} A variety of transition effects
  220. 0:00:51.80 0:01:00.00 EWLvu   {wipe left} includes wipes in any direction
  221. 0:00:52.60 0:01:00.00 ED32vu  {dissolve} pseudo-dissolves,
  222. 0:00:56.00 0:01:00.00 ERD4vu  {medium roll down} and scrolling effects.
  223.  
  224.   # Demonstrate the #Include command.
  225.   # The VH (vertical height) and CSL (background shade line) directives
  226.   # are demonstrated in the #included script.
  227.  
  228. #I 0:01:00.00 idemo  # include another script, offset by 60 seconds
  229.  
  230.   # Outlining and shadowing.  The first and second lines show outlining
  231.   # a mono-color font.  The third line demonstrates font shadow generation.
  232.   # The shadow extends to the southwest (lower left).  The fourth line
  233.   # demonstrates both outlining and shadowing (to the southeast).  We use
  234.   # font 3 for all these four lines (font 3 was set to JACOsub.font 18 in
  235.   # the beginning of this script).
  236.  
  237. 0:01:08.00 0:01:15.00 FO2f3vm JACOsub can also generate outlines of any thickness around normal mono-colored fonts,
  238. 0:01:08.00 0:01:15.00 fo3f3vu as you can see here.
  239. 0:01:08.00 0:01:15.00 FSSW4f3vu    \nAlso, dropshadows in any of 8 directions are possible,
  240. 0:01:08.00 0:01:15.00 fsSE3fo2f3vu \nand outlines and shadows may be combined.
  241.  
  242.   # Demonstrate clock pausing.  This is useful for creating
  243.   # a single script to handle multiple sides of a laserdisc.
  244.  
  245.   # At the same time, we'll decorate the screen with some colored
  246.   # rectangles.  We'll do the rectangles first, so the text will appear
  247.   # on top of them.  The rectangles themselves overlap, so the order in
  248.   # which we specify them is also important.
  249.  
  250. 0:01:15.00 0:01:16.00 cf1RDB 20 20 80 80 {big color 1 rectangle}
  251. 0:01:15.00 0:01:16.00 cf2rdb 25 25 75 75 {medium color 2 rectangle}
  252. 0:01:15.00 0:01:16.00 cf3rdb 30 30 70 70 {small color 3 rectangle}
  253. 0:01:15.00 0:01:16.00 cf0rdb 35 35 65 65 {smaller color 0 rectangle}
  254. 0:01:15.00 0:01:16.00 vm Right now the clock is paused (you can see this \
  255.                          if you play the script using the clock display).\n
  256. 0:01:15.00 0:01:16.00 vuf1cf1 Press any key to continue playing, or ESC to abort.
  257. #CLOCKPAUSE 0:01:15.00
  258.  
  259.   # Show the last screen.  We'll use the alternate frame-count format for
  260.   # the start and stop times.  For this script, there are 100 counts per
  261.   # second.  Normally this format would be used when the time resolution
  262.   # is 30 per second (which would have been the default if #T100 wasn't
  263.   # specified at the beginning of the script).
  264.   # The times below correspond to 0:01:16.00 and 0:01:21.00.
  265.  
  266.   # One last vertical directive to demonstrate: VA.  This is the opposite
  267.   # of VU.  It causes a title to appear immediately Above the previous
  268.   # title.  In the case below, the second title will appear above the
  269.   # first.  The same effect can be achieved by reversing the order of the
  270.   # lines, and using VM for the first directive and VU for the second.
  271.  
  272. @0007600 @0008100 vm \n\nAt that time, you may press any key to return to the Editor.
  273. @0007600 @0008100 VA OK, this script will be finished when the screen goes blank.
  274.  
  275. # You probably noticed that most of the lines above used the VM (Vertical
  276. # Middle) directive.  We could have made this the default, by specifying
  277. # the global command #DVM near the beginning of the file.  Then we
  278. # wouldn't have had to specify VM on each line, but we would have had to
  279. # specify VB (the former default) for those lines positioned at the bottom
  280. # of the screen.
  281.  
  282. # One last note:  If you encounter a problem in the way JACOsub behaves,
  283. # see if you can duplicate the problem in this demo script, and send me
  284. # a report (matulich_a@seaa.navsea.navy.mil).  I use the demo script for
  285. # debugging purposes, because it does nearly everything JACOsub can do.
  286.